package com.earl.eatbao.service;

import com.earl.eatbao.commons.service.BaseService;
import com.earl.eatbao.domain.eatbao.OrderDetail;

import java.util.List;

/**
 * @version:1.0
 * @author: MissYou
 * @date : 14:54
 * @desc:
 */
public interface OrderDetailService extends BaseService<OrderDetail, Long> {

    /**
     * 添加订单项关联
     * @param goodsId 商品项
     * @param ordersId 订单项
     * @param number
     * @return
     */
    Boolean addOrderDetailFromGoods(Long goodsId, Long ordersId, Integer number);

    /**
     * 删除订单下的订单管理项
     * @param ordersId
     * @return
     */
    void deleteOrderDetail(Long ordersId);

    /**
     * 获取订单关联项
     * @param ordersId
     * @return
     */
    List<OrderDetail> findOrdersDetail(Long ordersId);

}
